Integrand size = 23, antiderivative size = 236 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=-\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {a^2 f^2 \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{d^3}+\frac {i a^2 f^2 \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \cosh ^3\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \sinh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}+\frac {i a^2 f^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d^3}-\frac {a^2 f^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{d^3} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3399, 3395, 3393, 3384, 3379, 3382} \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=\frac {i a^2 f^2 \text {Chi}\left (x f+\frac {c f}{d}\right ) \sinh \left (e-\frac {c f}{d}\right )}{d^3}-\frac {a^2 f^2 \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \cosh \left (2 e-\frac {2 c f}{d}\right )}{d^3}-\frac {a^2 f^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{d^3}+\frac {i a^2 f^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (x f+\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \cosh ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{d^2 (c+d x)}-\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{d (c+d x)^2} \]
[In]
[Out]
Rule 3379
Rule 3382
Rule 3384
Rule 3393
Rule 3395
Rule 3399
Rubi steps \begin{align*} \text {integral}& = \left (4 a^2\right ) \int \frac {\sin ^4\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right )}{(c+d x)^3} \, dx \\ & = -\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {4 a^2 f \cosh ^3\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \sinh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}+\frac {\left (6 a^2 f^2\right ) \int \frac {\sinh ^2\left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right )}{c+d x} \, dx}{d^2}+\frac {\left (8 a^2 f^2\right ) \int \frac {\sinh ^4\left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right )}{c+d x} \, dx}{d^2} \\ & = -\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {4 a^2 f \cosh ^3\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \sinh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {\left (6 a^2 f^2\right ) \int \left (\frac {1}{2 (c+d x)}+\frac {i \sinh (e+f x)}{2 (c+d x)}\right ) \, dx}{d^2}+\frac {\left (8 a^2 f^2\right ) \int \left (\frac {3}{8 (c+d x)}-\frac {\cosh (2 e+2 f x)}{8 (c+d x)}+\frac {i \sinh (e+f x)}{2 (c+d x)}\right ) \, dx}{d^2} \\ & = -\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {4 a^2 f \cosh ^3\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \sinh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {\left (3 i a^2 f^2\right ) \int \frac {\sinh (e+f x)}{c+d x} \, dx}{d^2}+\frac {\left (4 i a^2 f^2\right ) \int \frac {\sinh (e+f x)}{c+d x} \, dx}{d^2}-\frac {\left (a^2 f^2\right ) \int \frac {\cosh (2 e+2 f x)}{c+d x} \, dx}{d^2} \\ & = -\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {4 a^2 f \cosh ^3\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \sinh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {\left (a^2 f^2 \cosh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (3 i a^2 f^2 \cosh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}+\frac {\left (4 i a^2 f^2 \cosh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (a^2 f^2 \sinh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx}{d^2}-\frac {\left (3 i a^2 f^2 \sinh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2}+\frac {\left (4 i a^2 f^2 \sinh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d^2} \\ & = -\frac {2 a^2 \cosh ^4\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {a^2 f^2 \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{d^3}+\frac {i a^2 f^2 \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \cosh ^3\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \sinh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}+\frac {i a^2 f^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d^3}-\frac {a^2 f^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{d^3} \\ \end{align*}
Time = 2.06 (sec) , antiderivative size = 198, normalized size of antiderivative = 0.84 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=\frac {a^2 \left (-4 f^2 \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 f (c+d x)}{d}\right )+4 i f^2 \text {Chi}\left (f \left (\frac {c}{d}+x\right )\right ) \sinh \left (e-\frac {c f}{d}\right )+\frac {d (-3 d-4 i f (c+d x) \cosh (e+f x)+d \cosh (2 (e+f x))-4 i d \sinh (e+f x)+2 c f \sinh (2 (e+f x))+2 d f x \sinh (2 (e+f x)))}{(c+d x)^2}+4 i f^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )-4 f^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )\right )}{4 d^3} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 624 vs. \(2 (214 ) = 428\).
Time = 2.53 (sec) , antiderivative size = 625, normalized size of antiderivative = 2.65
method | result | size |
risch | \(-\frac {i a^{2} f^{2} {\mathrm e}^{f x +e}}{2 d^{3} \left (\frac {c f}{d}+f x \right )^{2}}-\frac {i a^{2} f^{2} {\mathrm e}^{f x +e}}{2 d^{3} \left (\frac {c f}{d}+f x \right )}-\frac {i a^{2} f^{2} {\mathrm e}^{-\frac {c f -d e}{d}} \operatorname {Ei}_{1}\left (-f x -e -\frac {c f -d e}{d}\right )}{2 d^{3}}-\frac {3 a^{2}}{4 d \left (d x +c \right )^{2}}-\frac {f^{3} a^{2} {\mathrm e}^{-2 f x -2 e} x}{4 d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}\right )}-\frac {f^{3} a^{2} {\mathrm e}^{-2 f x -2 e} c}{4 d^{2} \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}\right )}+\frac {f^{2} a^{2} {\mathrm e}^{-2 f x -2 e}}{8 d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}\right )}+\frac {f^{2} a^{2} {\mathrm e}^{\frac {2 c f -2 d e}{d}} \operatorname {Ei}_{1}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right )}{2 d^{3}}+\frac {f^{2} a^{2} {\mathrm e}^{2 f x +2 e}}{8 d^{3} \left (\frac {c f}{d}+f x \right )^{2}}+\frac {f^{2} a^{2} {\mathrm e}^{2 f x +2 e}}{4 d^{3} \left (\frac {c f}{d}+f x \right )}+\frac {f^{2} a^{2} {\mathrm e}^{-\frac {2 \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (-2 f x -2 e -\frac {2 \left (c f -d e \right )}{d}\right )}{2 d^{3}}-\frac {i a^{2} f^{3} {\mathrm e}^{-f x -e} x}{2 d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}\right )}-\frac {i a^{2} f^{3} {\mathrm e}^{-f x -e} c}{2 d^{2} \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}\right )}+\frac {i a^{2} f^{2} {\mathrm e}^{-f x -e}}{2 d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}\right )}+\frac {i a^{2} f^{2} {\mathrm e}^{\frac {c f -d e}{d}} \operatorname {Ei}_{1}\left (f x +e +\frac {c f -d e}{d}\right )}{2 d^{3}}\) | \(625\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 454 vs. \(2 (209) = 418\).
Time = 0.26 (sec) , antiderivative size = 454, normalized size of antiderivative = 1.92 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=-\frac {{\left (2 \, a^{2} d^{2} f x + 2 \, a^{2} c d f - a^{2} d^{2} - {\left (2 \, a^{2} d^{2} f x + 2 \, a^{2} c d f + a^{2} d^{2}\right )} e^{\left (4 \, f x + 4 \, e\right )} + 4 \, {\left (i \, a^{2} d^{2} f x + i \, a^{2} c d f + i \, a^{2} d^{2}\right )} e^{\left (3 \, f x + 3 \, e\right )} + 2 \, {\left (3 \, a^{2} d^{2} + 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (\frac {2 \, {\left (d e - c f\right )}}{d}\right )} + 2 \, {\left (-i \, a^{2} d^{2} f^{2} x^{2} - 2 i \, a^{2} c d f^{2} x - i \, a^{2} c^{2} f^{2}\right )} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (\frac {d e - c f}{d}\right )} + 2 \, {\left (i \, a^{2} d^{2} f^{2} x^{2} + 2 i \, a^{2} c d f^{2} x + i \, a^{2} c^{2} f^{2}\right )} {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (-\frac {d e - c f}{d}\right )} + 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )}\right )} e^{\left (2 \, f x + 2 \, e\right )} + 4 \, {\left (i \, a^{2} d^{2} f x + i \, a^{2} c d f - i \, a^{2} d^{2}\right )} e^{\left (f x + e\right )}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{8 \, {\left (d^{5} x^{2} + 2 \, c d^{4} x + c^{2} d^{3}\right )}} \]
[In]
[Out]
\[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=- a^{2} \left (\int \frac {\sinh ^{2}{\left (e + f x \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \left (- \frac {2 i \sinh {\left (e + f x \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\right )\, dx + \int \left (- \frac {1}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\right )\, dx\right ) \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 205, normalized size of antiderivative = 0.87 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=-\frac {1}{4} \, a^{2} {\left (\frac {1}{d^{3} x^{2} + 2 \, c d^{2} x + c^{2} d} - \frac {e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} E_{3}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )}^{2} d} - \frac {e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} E_{3}\left (-\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )}^{2} d}\right )} + i \, a^{2} {\left (\frac {e^{\left (-e + \frac {c f}{d}\right )} E_{3}\left (\frac {{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )}^{2} d} - \frac {e^{\left (e - \frac {c f}{d}\right )} E_{3}\left (-\frac {{\left (d x + c\right )} f}{d}\right )}{{\left (d x + c\right )}^{2} d}\right )} - \frac {a^{2}}{2 \, {\left (d^{3} x^{2} + 2 \, c d^{2} x + c^{2} d\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 682 vs. \(2 (209) = 418\).
Time = 0.27 (sec) , antiderivative size = 682, normalized size of antiderivative = 2.89 \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=-\frac {4 \, a^{2} d^{2} f^{2} x^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} - 4 i \, a^{2} d^{2} f^{2} x^{2} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (e - \frac {c f}{d}\right )} + 4 i \, a^{2} d^{2} f^{2} x^{2} {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (-e + \frac {c f}{d}\right )} + 4 \, a^{2} d^{2} f^{2} x^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} + 8 \, a^{2} c d f^{2} x {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} - 8 i \, a^{2} c d f^{2} x {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (e - \frac {c f}{d}\right )} + 8 i \, a^{2} c d f^{2} x {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (-e + \frac {c f}{d}\right )} + 8 \, a^{2} c d f^{2} x {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} + 4 \, a^{2} c^{2} f^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} - 4 i \, a^{2} c^{2} f^{2} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (e - \frac {c f}{d}\right )} + 4 i \, a^{2} c^{2} f^{2} {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (-e + \frac {c f}{d}\right )} + 4 \, a^{2} c^{2} f^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} - 2 \, a^{2} d^{2} f x e^{\left (2 \, f x + 2 \, e\right )} + 4 i \, a^{2} d^{2} f x e^{\left (f x + e\right )} + 4 i \, a^{2} d^{2} f x e^{\left (-f x - e\right )} + 2 \, a^{2} d^{2} f x e^{\left (-2 \, f x - 2 \, e\right )} - 2 \, a^{2} c d f e^{\left (2 \, f x + 2 \, e\right )} + 4 i \, a^{2} c d f e^{\left (f x + e\right )} + 4 i \, a^{2} c d f e^{\left (-f x - e\right )} + 2 \, a^{2} c d f e^{\left (-2 \, f x - 2 \, e\right )} - a^{2} d^{2} e^{\left (2 \, f x + 2 \, e\right )} + 4 i \, a^{2} d^{2} e^{\left (f x + e\right )} - 4 i \, a^{2} d^{2} e^{\left (-f x - e\right )} - a^{2} d^{2} e^{\left (-2 \, f x - 2 \, e\right )} + 6 \, a^{2} d^{2}}{8 \, {\left (d^{5} x^{2} + 2 \, c d^{4} x + c^{2} d^{3}\right )}} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+i a \sinh (e+f x))^2}{(c+d x)^3} \, dx=\int \frac {{\left (a+a\,\mathrm {sinh}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2}{{\left (c+d\,x\right )}^3} \,d x \]
[In]
[Out]